const client = require("./client");

const exportTable = async (app_token, table_id, view_id) => {
  try {
    const res = await client.bitable.appTableRecord.search({
      params: {
        page_size: 10,
      },
      path: {
        app_token: app_token,
        table_id: table_id,
      },
      data: {
        view_id: view_id,
        field_names: ["姓名"],
      },
    });
    return res;
  } catch (e) {
    return e;
  }
};
module.exports = exportTable;
